#ifndef _CALENDAR_HANDLER_H
#define _CALENDAR_HANDLER_H

class DLL_EXPORT CalendarEntry
{
	friend class CalendarManager;
	friend class Session;
public:
	char title[255];
	char description[1024];
	ui8 type;
	ui32 dungeonid;
	ui32 unk32;
	ui32 flags;
	set<Player*> m_invited;

	CalendarEntry();

	Player* GetCreator() { return *(m_invited.begin()); }
	prop<ui32, CalendarEntry, true> Day;
	prop<ui32, CalendarEntry, true> Month;
	prop<ui32, CalendarEntry, true> Year;
	prop<ui32, CalendarEntry, true> Houre;
	prop<ui32, CalendarEntry, true> Minute;
private:
	ui32 GetDay();
	ui32 GetMonth();
	ui32 GetYear();
	ui32 GetHoure();
	ui32 GetMinute();
	ui32 ftime;
};

class DLL_EXPORT CalendarManager : public Single<CalendarManager>
{
	vector<CalendarEntry*> m_calendarevents;
public:
	CalendarManager();
	void AddCalendarEvent(CalendarEntry* event);
};

#define sCalendarManager (*CalendarManager::getSingle())

#endif